﻿using Autodesk.Revit.DB;
using Autodesk.Revit.UI;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace demo
{
    public class 线圆弧
    {

        public static void 线方向()
        {
            var c1 = Line.CreateBound(new XYZ(0, 0, 0), new XYZ(100, 0, 0));
            TaskDialog.Show("获取线方向",$"{c1.Direction.X}-{c1.Direction.Y}-{c1.Direction.Z}");

            向量计算();

        }

        public static void 向量计算()
        {
            var c1 = new XYZ(100, 20, 0);
            //var c = c1.Normalize();

            // 向量指定向量的叉积
            //c1.CrossProduct(c);

            var c2 = new XYZ(50,100,0);

            TaskDialog.Show("角度", $"{c1.AngleTo(c2)}");


        }

        //0,[(0.438371147, -0.898794046, 0.000000000),(0.000000000, 0.000000000, 1.000000000),(0.000000000, 0.000000000, 1.000000000)]
        //0.02,[(0.438371147, -0.898794046, 0.000000000),(0.000000000, 0.000000000, 1.000000000),(0.000000000, 0.000000000, 1.000000000)]
        //0.04,[(0.438371147, -0.898794046, 0.000000000),(0.000000000, 0.000000000, 1.000000000),(0.000000000, 0.000000000, 1.000000000)]
        //0.06,[(0.438371147, -0.898794046, 0.000000000),(0.000000000, 0.000000000, 1.000000000),(0.000000000, 0.000000000, 1.000000000)]
        //0.08,[(0.438371147, -0.898794046, 0.000000000),(0.000000000, 0.000000000, 1.000000000),(0.000000000, 0.000000000, 1.000000000)]
        //0.1,[(0.438371147, -0.898794046, 0.000000000),(0.000000000, 0.000000000, 1.000000000),(0.000000000, 0.000000000, 1.000000000)]
        //0.12,[(0.438371147, -0.898794046, 0.000000000),(0.000000000, 0.000000000, 1.000000000),(0.000000000, 0.000000000, 1.000000000)]
        //0.14,[(0.438371147, -0.898794046, 0.000000000),(0.000000000, 0.000000000, 1.000000000),(0.000000000, 0.000000000, 1.000000000)]
        //0.16,[(0.438371147, -0.898794046, 0.000000000),(0.000000000, 0.000000000, 1.000000000),(0.000000000, 0.000000000, 1.000000000)]
        //0.18,[(0.438371147, -0.898794046, 0.000000000),(0.000000000, 0.000000000, 1.000000000),(0.000000000, 0.000000000, 1.000000000)]
        //0.2,[(0.438371147, -0.898794046, 0.000000000),(0.000000000, 0.000000000, 1.000000000),(0.000000000, 0.000000000, 1.000000000)]
        //0.22,[(0.438371147, -0.898794046, 0.000000000),(0.000000000, 0.000000000, 1.000000000),(0.000000000, 0.000000000, 1.000000000)]
        //0.24,[(0.438371147, -0.898794046, 0.000000000),(0.000000000, 0.000000000, 1.000000000),(0.000000000, 0.000000000, 1.000000000)]
        //0.26,[(0.438371147, -0.898794046, 0.000000000),(0.000000000, 0.000000000, 1.000000000),(0.000000000, 0.000000000, 1.000000000)]
        //0.28,[(0.438371147, -0.898794046, 0.000000000),(0.000000000, 0.000000000, 1.000000000),(0.000000000, 0.000000000, 1.000000000)]
        //0.3,[(0.438371147, -0.898794046, 0.000000000),(0.000000000, 0.000000000, 1.000000000),(0.000000000, 0.000000000, 1.000000000)]
        //0.32,[(0.438371147, -0.898794046, 0.000000000),(0.000000000, 0.000000000, 1.000000000),(0.000000000, 0.000000000, 1.000000000)]
        //0.34,[(0.438371147, -0.898794046, 0.000000000),(0.000000000, 0.000000000, 1.000000000),(0.000000000, 0.000000000, 1.000000000)]
        //0.36,[(0.438371147, -0.898794046, 0.000000000),(0.000000000, 0.000000000, 1.000000000),(0.000000000, 0.000000000, 1.000000000)]
        //0.38,[(0.438371147, -0.898794046, 0.000000000),(0.000000000, 0.000000000, 1.000000000),(0.000000000, 0.000000000, 1.000000000)]
        //0.4,[(0.438371147, -0.898794046, 0.000000000),(0.000000000, 0.000000000, 1.000000000),(0.000000000, 0.000000000, 1.000000000)]
        //0.42,[(0.438371147, -0.898794046, 0.000000000),(0.000000000, 0.000000000, 1.000000000),(0.000000000, 0.000000000, 1.000000000)]
        //0.44,[(0.438371147, -0.898794046, 0.000000000),(0.000000000, 0.000000000, 1.000000000),(0.000000000, 0.000000000, 1.000000000)]
        //0.46,[(0.438371147, -0.898794046, 0.000000000),(0.000000000, 0.000000000, 1.000000000),(0.000000000, 0.000000000, 1.000000000)]
        //0.48,[(0.438371147, -0.898794046, 0.000000000),(0.000000000, 0.000000000, 1.000000000),(0.000000000, 0.000000000, 1.000000000)]
        //0.5,[(0.438371147, -0.898794046, 0.000000000),(0.000000000, 0.000000000, 1.000000000),(0.000000000, 0.000000000, 1.000000000)]
        //0.52,[(0.438371147, -0.898794046, 0.000000000),(0.000000000, 0.000000000, 1.000000000),(0.000000000, 0.000000000, 1.000000000)]
        //0.54,[(0.438371147, -0.898794046, 0.000000000),(0.000000000, 0.000000000, 1.000000000),(0.000000000, 0.000000000, 1.000000000)]
        //0.56,[(0.438371147, -0.898794046, 0.000000000),(0.000000000, 0.000000000, 1.000000000),(0.000000000, 0.000000000, 1.000000000)]
        //0.58,[(0.438371147, -0.898794046, 0.000000000),(0.000000000, 0.000000000, 1.000000000),(0.000000000, 0.000000000, 1.000000000)]
        //0.6,[(0.438371147, -0.898794046, 0.000000000),(0.000000000, 0.000000000, 1.000000000),(0.000000000, 0.000000000, 1.000000000)]
        //0.62,[(0.438371147, -0.898794046, 0.000000000),(0.000000000, 0.000000000, 1.000000000),(0.000000000, 0.000000000, 1.000000000)]
        //0.64,[(0.438371147, -0.898794046, 0.000000000),(0.000000000, 0.000000000, 1.000000000),(0.000000000, 0.000000000, 1.000000000)]
        //0.66,[(0.438371147, -0.898794046, 0.000000000),(0.000000000, 0.000000000, 1.000000000),(0.000000000, 0.000000000, 1.000000000)]
        //0.68,[(0.438371147, -0.898794046, 0.000000000),(0.000000000, 0.000000000, 1.000000000),(0.000000000, 0.000000000, 1.000000000)]
        //0.7,[(0.438371147, -0.898794046, 0.000000000),(0.000000000, 0.000000000, 1.000000000),(0.000000000, 0.000000000, 1.000000000)]
        //0.72,[(0.438371147, -0.898794046, 0.000000000),(0.000000000, 0.000000000, 1.000000000),(0.000000000, 0.000000000, 1.000000000)]
        //0.74,[(0.438371147, -0.898794046, 0.000000000),(0.000000000, 0.000000000, 1.000000000),(0.000000000, 0.000000000, 1.000000000)]
        //0.76,[(0.438371147, -0.898794046, 0.000000000),(0.000000000, 0.000000000, 1.000000000),(0.000000000, 0.000000000, 1.000000000)]
        //0.78,[(0.438371147, -0.898794046, 0.000000000),(0.000000000, 0.000000000, 1.000000000),(0.000000000, 0.000000000, 1.000000000)]
        //0.8,[(0.438371147, -0.898794046, 0.000000000),(0.000000000, 0.000000000, 1.000000000),(0.000000000, 0.000000000, 1.000000000)]0.82,[(0.438371147, -0.898794046, 0.000000000),(0.000000000, 0.000000000, 1.000000000),(0.000000000, 0.000000000, 1.000000000)]0.84,[(0.438371147, -0.898794046, 0.000000000),(0.000000000, 0.000000000, 1.000000000),(0.000000000, 0.000000000, 1.000000000)]0.86,[(0.438371147, -0.898794046, 0.000000000),(0.000000000, 0.000000000, 1.000000000),(0.000000000, 0.000000000, 1.000000000)]0.88,[(0.438371147, -0.898794046, 0.000000000),(0.000000000, 0.000000000, 1.000000000),(0.000000000, 0.000000000, 1.000000000)]0.9,[(0.438371147, -0.898794046, 0.000000000),(0.000000000, 0.000000000, 1.000000000),(0.000000000, 0.000000000, 1.000000000)]0.92,[(0.438371147, -0.898794046, 0.000000000),(0.000000000, 0.000000000, 1.000000000),(0.000000000, 0.000000000, 1.000000000)]0.94,[(0.438371147, -0.898794046, 0.000000000),(0.000000000, 0.000000000, 1.000000000),(0.000000000, 0.000000000, 1.000000000)]0.96,[(0.438371147, -0.898794046, 0.000000000),(0.000000000, 0.000000000, 1.000000000),(0.000000000, 0.000000000, 1.000000000)]
        //0.98,[(0.438371147, -0.898794046, 0.000000000),(0.000000000, 0.000000000, 1.000000000),(0.000000000, 0.000000000, 1.000000000)]1,[(0.438371147, -0.898794046, 0.000000000),(0.000000000, 0.000000000, 1.000000000),(0.000000000, 0.000000000, 1.000000000)]线程 0x33a0 已退出，返回值为 0 (0x0)。


    }
}
